#include "standardCamera.h"

#include <QWheelEvent>



GALCamera::GALCamera()
{
  standard = true;
  orthoSize = 1.0;
}

qreal GALCamera::zNear() const
{
  if (standard)
	return 0.001;
  else
	return Camera::zNear();
}

qreal GALCamera::zFar() const
{
  if (standard)
	return 1000.0;
  else
	return Camera::zFar();
}

void GALCamera::changeOrthoFrustumSize(int delta)
{
  if (delta > 0)
	orthoSize *= 1.1;
  else
	orthoSize /= 1.1;
}

void GALCamera::getOrthoWidthHeight(GLdouble &halfWidth, GLdouble &halfHeight) const
{
  if (standard)
  {
	halfHeight = orthoSize;
	halfWidth = aspectRatio() * orthoSize;
  }
  else
	Camera::getOrthoWidthHeight(halfWidth, halfHeight);
}
